﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CCLD_TD.ascx.cs" Inherits="web_Controls_ccld_td" %>

        <%
            bool isOdl = true;
            int _itemperPage = 24;
            if (dtt_main.Rows.Count > 0)
            {
                int _total = dtt_main.Rows.Count;

                double _tong_mucdong = Convert.ToDouble(_total) / _itemperPage;
                double _times = System.Math.Ceiling(_tong_mucdong);                
                int _thutu = 0;
                for (int a = 0; a < _times; a++)
                {
                    int _for = 0;
                    if (a < _times-1)
                    {
                        _for = _thutu + _itemperPage;
                    }
                    else
                    {
                        _for = _total - _for;
                        
                    }
                    %>
                    <div>
                        <table style="width:100%;font-size:18px;">
                        <%
                            for (int i = _thutu; i < _for; i++)
                            {
                             %>
                                <% 
                                    if (isOdl)
                                    {
                                        %>
                                        <tr style="height:30px;background:#fff;border-bottom:1px solid #ccc;"> 
                                            <td style="width:40px;"><%=i + 1%></td> 
                                            <td style="width:200px;" align="left"><a style="text-decoration:none;" target="_blank" href="../../Default.aspx?page=vtn_chitiet&id=<%=dtt_main.Rows[i]["ma_ho_so"].ToString()%>"><%=dtt_main.Rows[i]["tieu_de_ho_so"].ToString().ToLower()%></a></td> 
                                            <td style="width:120px;" align="left"><%=dtt_main.Rows[i]["vi_tri_tuyen_dung"].ToString().ToLower()%></td> 
                                            <td style="width:60px;" class="Normal" align="center" ><%=DateTime.Parse(dtt_main.Rows[i]["ngay_het_han"].ToString()).ToString("dd-MM-yyyy")%></td> 
                                            <td style="width:60px;" class="Normal" align="center" ><%=dtt_main.Rows[i]["so_luong_tuyen"]%></td> 
                                            <td style="width:120px;"><%=dtt_main.Rows[i]["Ten_doanh_nghiep"]%></td>
                                        </tr>
                                        <%
                                            isOdl = false;
                                    }
                                    else {
                                        %>
                                        <tr style="height:30px;background:#ccc;border-bottom:1px solid #ccc;"> 
                                            <td style="width:40px;"><%=i + 1%></td> 
                                            <td style="width:200px;" align="left"><a style="text-decoration:none;" target="_blank" href="../../Default.aspx?page=vtn_chitiet&id=<%=dtt_main.Rows[i]["ma_ho_so"].ToString()%>"><%=dtt_main.Rows[i]["tieu_de_ho_so"].ToString().ToLower()%></a></td> 
                                            <td style="width:120px;" align="left"><%=dtt_main.Rows[i]["vi_tri_tuyen_dung"].ToString().ToLower()%></td> 
                                            <td style="width:60px;" class="Normal" align="center" ><%=DateTime.Parse(dtt_main.Rows[i]["ngay_het_han"].ToString()).ToString("dd-MM-yyyy")%></td> 
                                            <td style="width:60px;" class="Normal" align="center" ><%=dtt_main.Rows[i]["so_luong_tuyen"]%></td> 
                                            <td style="width:120px;"><%=dtt_main.Rows[i]["Ten_doanh_nghiep"]%></td>
                                        </tr>
                                        <%
                                            isOdl = true;
                                    }
                                    %>
                                    
                                <%
                                    _thutu++;
                            }                
                        %>                        
                        </table>
                    </div>
                    <%
                }
            }
        %>